{extend name="public:layout" /}
{block name="title"}管理员管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 管理员列表</a></li>
                <li class="active">修改管理员</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">用户名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入用户名"
                               name="username" value="{$info.username}" datatype="*"/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">用户密码</label>
                    <div class="col-sm-4">
                        <input type="password" class="form-control" placeholder="请输入用户密码"
                               name="password" value="" />
                        <p class="help-block">不修改密码请留空</p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">姓名</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入姓名"
                               name="name" value="{$info.name}" datatype="*" />
                    </div>
                </div>
                {neq name="info.uid" value="1"}
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">所属角色</label>
                    <div class="col-sm-4">
                        <select name="group_id" class="form-control">
                            <option value="0">请选择</option>
                            {volist name="groupList" id="vo"}
                            <option value="{$vo.group_id}" {eq name="info.group_id" value="$vo['group_id']"}selected{/eq}>{$vo.title}</option>
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">状态</label>
                    <div class="col-sm-4">
                        <label class="radio-inline i-checks">
                            <input type="radio" name="status" value="1" {eq name="info.status" value="1"}checked{/eq}> 正常
                        </label>
                        <label class="radio-inline i-checks">
                            <input type="radio" name="status" value="0" {eq name="info.status" value="0"}checked{/eq}> 禁用
                        </label>
                    </div>
                </div>
                {/neq}
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}